<template>
    <div class="com-cnt">
        <h3 class="tit1">代理人信息</h3>
        <ul class="list">
            <li>代理人姓名 <span>{{list.user_name}}</span></li>
            <li>身份证号<span>{{list.id_card}}</span></li>
            <li>手机号<span>{{list.phone}}</span></li>
            <li>银行卡号<span>{{list.id_bank}}</span></li>
        </ul>
        <ul class="list">
            <li>店铺名称<span>{{list.shop_name}}</span></li>
            <li>店铺地址<span>{{list.shop_address}}</span></li>
            <li>推荐人手机号码<span>{{list.ref_mobile}}</span></li>
        </ul>
        <div class="yyzz">
            <p>营业执照</p>
            <div class="showyyzz"><img alt="" :src="list.img"></div>
        </div>
    </div>
</template>

<script>
import axios from 'axios'
import http from "@/assets/js/axios"
import https from "@/assets/js/axiosh"
import { domain } from '@/assets/js/config'
import { domains } from '@/assets/js/config'
import Qs from 'qs'
export default {
    data() {
        return {
            list: ''
        }
    },
    components: {

    },
    mounted: function(){
        this.getList()
    },
    methods: {

        direct: function (val) {
            this.$router.push({ path: '/' + val });
        },
        //调取信息
        getList: function(){
            var that = this
            var userToken = localStorage.getItem('tokens')
            axios({
                url: domains + '/f/agent/home/info?token=' + userToken,
                method: 'post',
                headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
                //data: Qs.stringify(postDo)
            }).then(res => { that.listsucc(res) }).catch(err => { that.listerr(err) })
        },
        //调取信息成功
        listsucc: function(res){
            // console.log(res)
            this.list = res.data.data

        },
        listerr: function(err){
            console.log(err)
        }
    }
}
</script>

<style lang='stylus' scoped>
.com-cnt
    width 100%
    height 100%
    position relative
    z-index 99
    background #ffffff
    .tit1
        height 71px
        line-height 71px
        background #F0F0F0
        font-size 18px
        padding-left 36px
        position relative
    .tit1:before
        content ''
        width 4px
        height 16px
        background #aad112
        position absolute
        left 20px
        top 26px
    .list:after
        content ''
        width 100%
        height 12px
        background #f0f0f0
    .list
        padding 0 20px 0 21px
        font-size 12px
        border-bottom solid 12px #f0f0f0
        li 
            height 48px
            line-height 48px
            border-bottom 1px solid #dddddd
            span 
                color #999999
                float right
        li:last-child
            border none
    .yyzz
        padding-left 20px
        p 
            height 47px
            font-size 12px
            line-height 47px
        .showyyzz
            width 100px
            height 100px
            //border 1px dashed #999
            img 
                width 100%
                height 100%
                background url('../../assets/imgs/agent/yyzz.png') no-repeat
                background-position 50%
                background-size 29px 24px
</style>
